<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Mo.js - 简洁高效，容易扩展 - JavaScript Library</title>
<script src="../lib/mo.js" type="text/javascript" charset="utf-8"></script>
<script src="../lib/mo.effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../res/static.js" type="text/javascript" charset="utf-8"></script>
<link href="../res/layout.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>

    <div id="wrapper">

        <h1 id="mo-js"> Mo<span>.js</span> </h1>
        <h4 id="build"> Mo.js - 高效 JavaScript 函数库 </h4>
        
        <div id="search">
            <form action="../search.html" method="get">
                <input type="text" name="q" value="搜索..." />
            </form>
        </div>

        <div id="naver">
            <ul>
                <li><a href="../index.html">Home</a></li>
                <li><a href="../browser.html">Browser</a></li>
                <li><a href="../selector.html">Selector</a></li>
                <!--li><a href="../ajax.html">Ajax</a></li-->
                <!--li><a href="../drag.html">Drag</a></li-->
                <li><a href="../event.html">Event</a></li>
                <li><a href="../date.html">Date</a></li>
                <li><a href="../string.html">String</a></li>
                <!--li><a href="../number.html">Number</a></li-->
                <li><a href="../array.html">Array</a></li>
                <li><a href="../cookie.html">Cookie</a></li>
                <li><a href="../validate.html">Validate</a></li>
                <!--li><a href="../hash.html">Hash</a></li-->
                <li><a href="../method.html">Method</a></li>
                <li><a href="../api.html">API</a></li>
            </ul>
        </div>

        <div id="locate">
            Mo &gt; API &gt; Effect
        </div>

        <dl id="entry">

            <dt> Mo.Grade() </dt>
            <dd>
                <p>星级评分组件。</p>

                <pre>new Mo.Grade( "#grade" , 1 , 5 , 1 , 'blue.png' , 'gold.png' , function( rate ){ Mo("#rate").value( rate ); } );</pre>

                <p> <span id="grade"></span> <span id="rank"></span> <span id="rate"></span> </p>

                <script>
                    var rank = ["请给总体评分打分","很差","差","还行","好","很好"];
                    var rate = new Mo.Grade( "#grade" , 1 , 5 , 0 , '../res/images/blue.png' , '../res/images/gold.png' , function( rate ){
                        Mo("#rank").html( rank[rate] );
                        Mo("#rate").html( '['+rate+']' );
                    } );
                </script>

            </dd>
            
            <dt> Mo.Process() </dt>
            <dd>

                <p>进度条。</p>

                <pre>Mo.Process();</pre>

                <table border="0" cellpadding="3" cellspacing="1">
                <tr class="mo-process">
                        <td>
                                <span class="count">5 票</span>
                                <span id="percent-141-A">0%</span>
                                <div class="ratio"><span id="option-141-A" style="background:#EC3EC5;" /></div>
                        </td>
                        <td>
                                <span class="count">4 票</span>
                                <span id="percent-141-B">0%</span>
                                <div class="ratio"><span id="option-141-B" style="background:#4724DA;" /></div>
                        </td>
                </tr>        
                </table>
                
                <script type="text/javascript">
                var P = new Mo.Process();
                var G = new P.Group();
                        G.Option("141-A",5);
                        G.Option("141-B",4);
                        P.Show();
                </script> 

            </dd>

            <dt> Mo.DateDiff( expire[, func] ) </dt>
            <dd>

                <p>倒计时。</p>

                <blockquote>
                    <p> <strong>expire</strong>  过期时间,Unix 时间戳（秒）</p>
                    <p> <strong>func</strong>  函数名称或匿名函数</p>
                </blockquote>

                <p>func 可接受参数</p>

                <blockquote>
                    <p> <strong>diff</strong>  -1 为已过期，否则为相差的秒数</p>
                    <p> <strong>date</strong>  返回相差的时间值，JSON 对象，{ "d":"天", "h":"小时", "m":"分", "s":"秒" }</p>
                </blockquote>

                <pre>Mo.DateDiff();</pre>

                <p id="down">
                <script>                
                Mo.DateDiff( ( Mo.Date().time()+ ( 3600 * 24 * 30 ) ) , function( result, date ){ 
                        Mo("#down").html( result + '秒 - 共计' + date["d"]+"天"+date["h"]+"小时"+date["m"]+"分钟"+date["s"]+"秒" ); 
                });
                </script>
                </p>

            </dd>

        </dl>

    </div>

    <div id="footer">

        Copyright &copy; 2011 <a href="http://www.veryide.com">VeryIDE</a> <span>|</span><a href="http://www.veryide.com/projects/">Projects</a> <span>|</span> <a href="http://www.veryide.com/projects/mojs/">Mo.js</a> <span>|</span> <a href="../packer.html">Packer</a> <span>|</span> <a href="../regex.html">Regex</a>

    </div>
            
    <p style="display:none;">
        <script language="javascript" type="text/javascript" src="http://js.users.51.la/960393.js"></script>
    </p>
            
</body>
</html>